﻿using Prism.Dialogs;
using Prism.DryIoc;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace L2_RegisterType.ViewModels;

public class MsgViewModel : BindableBase, IDialogAware
{
    public string Title => "编辑";

    private string _text;
    public string Text
    {
        get
        {
            return _text;
        }
        set
        {
            _text = value;
            RaisePropertyChanged();
        }
    }

    public DialogCloseListener RequestClose { get; }

    public bool CanCloseDialog()
    {
        return !string.IsNullOrWhiteSpace(Text);
    }

    public void OnDialogClosed()
    {
        throw new NotImplementedException();
    }

    public void OnDialogOpened(IDialogParameters parameters)
    {
        throw new NotImplementedException();
    }
}